<%-- 
    Document   : loginForm.jsp
    Created on : 17 Nov, 2009, 12:05:02 PM
    Author     : subhash
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>The Great Wall</title>
    </head>
    <body>

        <header>
            <jsp:include page="header.jsp"/>
        </header>

        <ul>
            <c:forEach var="error" items="${requestScope.errors}">
                <li><c:out value="${error}"/></li>
            </c:forEach>
        </ul>

        <c:if test="${empty sessionScope.username}">
        <form method="post" action="${pageContext.request.contextPath}/login">
            <table border="0">
                <tr>
                    <td>Username or email:</td>
                    <td><input name="username" type="text" size="30"/></td>
                </tr>
                <tr>
                    <td>Password:</td>
                    <td><input name="password" type="password" size="30"/></td>
                </tr>
                <tr>
                    <td colspan="2"><input type="submit" value="Enter!"/></td>
                </tr>
            </table>
        </form>
        </c:if>

        <footer>
            <jsp:include page="footer.jsp"/>
        </footer>
    </body>
</html>
